package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;

import com.ruoyi.mapper.DeviceDetailsMapper;
import com.ruoyi.domain.DeviceDetails;
import com.ruoyi.service.DeviceDetailsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class DeviceDetailsServiceImp implements DeviceDetailsService {

    @Resource
    DeviceDetailsMapper deviceDetailsMapper;

    @Override
    public int addDeviceData(DeviceDetails deviceDetails) {
        return deviceDetailsMapper.addDeviceData(deviceDetails);
    }

    @Override
    public List<DeviceDetails> getList() {
        List<DeviceDetails> list = deviceDetailsMapper.getList(1,1);
        return list;
    }

    public int updataConnectStatus(DeviceDetails deviceDetails) {
        int count = deviceDetailsMapper.updataConnectStatus(deviceDetails);
        return count;
    }
}
